﻿DECLARE @Var_RegistId  VARCHAR(100) SET @Var_RegistId  = @RegistId_In

IF NOT EXISTS(SELECT * FROM AP_PreRegist_DongRuan(NOLOCK) WHERE Id = @Var_RegistId)
BEGIN
	SELECT -1 AS RESULT,'未查找到相应的预挂号记录' AS RESULTTEXT
	RETURN
END

DELETE FROM AP_PreRegist_DongRuan WHERE Id = @Var_RegistId AND IsReservation = 0

SELECT 1 AS RESULT,'成功' AS RESULTTEXT

